package com.jueyunqi.util;

import org.apache.log4j.Logger;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class ApplicationContextHelper implements ApplicationContextAware   {
	private static Logger logger = Logger.getLogger(ApplicationContextAware.class);
	private static ApplicationContext context;
	
	public static ApplicationContext getContext() {
		return context;
	}
	
	@Override
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		context = applicationContext;
		logger.info("init applicationContext ......");
	}
}
